A higher order behavioural algebraic institution for ASL
نویسنده
چکیده
In this paper we generalise the semantics of ASL including the three behavioural operators presented in for a xed but arbitrary algebraic institution After that we de ne a behavioural algebraic institution which is used to give an alternative semantics of the behavioural operators to de ne the normal forms of the both semantics of behavioural operators and to relate both semantics Finally we present a higher order behavioural algebraic institution Introduction ASL is a speci cation language which was originally de ned by a set of speci cation operators which determined the set of speci cation expressions of the language The most important operators of the original de nition were oper ators to build structured speci cations from smaller speci cations or to make some modi cations from a given speci cation like for example the renaming of a given speci cation This language was not originally designed to be used directly but as a basis to de ne the semantics of higher level speci cation lan guages Two speci cation languages which used ASL to de ne their semantics were EML and PLUSS A speci c kind of operator which appeared in ASL was an operator which was used to behaviourally abstract a given speci cation clos ing its model theoretical semantics by an equivalence relation between algebras Later on di erent operators related to the one just described were developed We will refer to these operators as behavioural operators In this paper we give a general semantic framework for behavioural oper ators In a general setting these operators are parameterized by xed but arbitrary equivalence relations There have been de ned three di erent kinds of behavioural operators in ASL We will refer to them as the abstract oper ator the behaviour operator and the quotient operator All of them have a speci cation as an argument and they transform the model theoretic semantics of the argument speci cation Intuitively the abstract operator extends the class of models of the argu ment speci cation with those models which are equivalent by an equivalence relation between models to some model belonging to the model theoretical se mantics of the argument speci cation The class of models of the behaviour operator is de ned by those models whose behaviour denoted also as a model and de ned via a congruence rela tion on values within a model belongs to the class of models of the argument speci cation of the operator Finally the class of models of the quotient operator is de ned by the closure under isomorphism of the quotient of the models associated to the semantics of the argument speci cation of the operator A formal semantics of these operators is given in by de ning their sig nature and their model theoretical semantics They use a rst order logic with equality to de ne the sentences of speci cations Apart from giving the seman tics of the operators a theory which establishes di erent equivalences between the semantics of these operators is presented In an alternative semantics for the behavioural operators is given using just at speci cations as argument speci cations They use higher order logic as speci cation logic and a similar theory as in to relate the semantics of the behaviour and abstract operator is developed Since both semantics are quite independent of the speci cation logic of the speci cation language it seems reasonable to make a generalisation of the se mantics of these operators for an arbitrary but xed institution These insti tutions have to satisfy speci c properties in order to include these operators in a version of ASL with structuring operators and they are a restricted ver sion of semiexact institutions presented in We refer to these institutions as algebraic institutions AINS and the two main restrictions are that the cat egory of signatures is the category of rst order relational signatures and the model functor of these institutions assigns to every rst order relational sig nature the category of algebras which we will denote as Alg instead of an arbitrary category of models Mod This is necessary because these institutions are used to de ne the semantics of di erent set of ASL operators including behavioural operators which we will denote as BASLker languages The signatures of the speci cation expressions of BASLker languages are rst order signatures since the semantics of some of the behavioural operators are de ned using a xed but arbitrary partial congruence and therefore using the internal structure of rst order signatures These languages also include the common operators of another set of operators of ASL which we will denote as ASLker languages These common operators are base speci cations with syntax a sum operator to de ne structured speci cations and an ex port operator These restrictions are not needed to de ne the semantics of the common operators of ASLker languages and see for the semantics of these operators in a xed but arbitrary semiexact institution In the semantics of the behavioural operators of BASLker languages is given just for an insti tution of in nitary rst order logic and for concrete observational equivalences See also for an abstract categorical framework to relate the semantics of the behavioural operators which is not required for our purposes In order to de ne a certain kind of proof systems for the deduction of sen tences from ASLker languages it is required additionally a normalisation func tion on speci cation expressions where the normal forms of speci cations are de ned in terms of the export operator with syntax j This nor malisation function is also useful to relate the semantics of and We call any set of operators de ned with a normalisation function and including at least the common operators of ASLker languages as ASLnf language To generalise the semantics of and we de ne a new institution which we will refer as behavioural algebraic institution BAINS which incorporates additional com ponents to a xed but arbitrary algebraic institution AINS in order to de ne the semantics of the behaviour operator of and the normalisation function of the behavioural operators with the semantics of The structure of the paper is as follows rst we introduce the abstract concept of algebraic institution and then we present a concrete higher order algebraic institution Then we give the semantics of the behavioural operators and how to relate them in an arbitrary but xed algebraic institution following the ideas of and Next we present behavioural algebraic institutions a normalisation function for the behavioural operators presented previously and a relationship between the semantics of and Finally we present concrete equivalence relations and a concrete behavioural algebraic institution using the concrete equivalences and the higher order algebraic institution presented in the rst section Semiexact algebraic institutions In this section we will present the abstract semantic framework to de ne the semantics of di erent operators of ASL including the behavioural operators We will assume prede ned basic concepts of institutions which can be found in or in De nition An algebraic institution AINS is an institution which con sists of The category of rst order relational signatures AlgSig whose objects are rst order relational signatures and morphisms are signature morphisms a functor SenAINS AlgSig Set the functor Alg AlgSig Cat where for any jAlgSigj Alg is the category of algebras for any morphism in AlgSig Alg is the reduct functor j Alg Alg for each jAlgSigj a satisfaction relation j AINS jAlg j SenAINS such that the satisfaction condition holds for any signature morphism and for any formula SenAINS This condition is formally de ned as A jAlg j A j AINS SenAINS Aj j AINS an abstract satisfaction condition holds for any formula in SenAINS A B jAlg j A B A j AINS B j AINS Notation and comments The main di erences between algebraic institutions and the original de nition of institutions is that the category of signatures is not an arbitrary category but the category of rst order relational signatures and that it is added the abstract satisfaction condition which almost all institutions satisfy We will normally refer to rst order relational signatures just as relational signatures For any relational signature S Op Pr jAlgSigj the functions Sorts Ops and Prs will return S Op and Pr respec tively For any relational signature S Op Pr if Pr we will de ne it just by S Op and it will be normally referred just as signature For any relational signature S Op Pr jAlgSigj and for a xed but arbitrary S sorted in nite denumerable set of variables X T X will denote the term algebra freely generated by X and P X will denote the set of terms of the form p t tn where p s sn Prs and t T s X tn T sn X For any algebra A AlgAINS and a S sorted valuation X A I T X A will denote the unique extension to a morphism of the valuation and for the case of p t tn P X I p t tn will hold if and only if I t I tn pA We will refer to them as the interpretations of terms and predicates associated to We will assume prede ned the function S f x v xn vn g which given a valuation X A and a set of pairs of the form f x v xn vn g such that xi Xsi and vi Asi for any i n it will return the usual update of the valuation with the given set of pairs If we will normally denote by the obvious embedding morphism and we will normally refer to it as inclusion Since it is well known that AlgSig has pushouts the pushout object of any pair of morphisms in AlgSig where jAlgSigj will be denoted in general as PO and if the pair of morphisms are both inclusions the pushout object will be normally denoted as and the pushout morphisms as inl inr In this last case we can assume in general that either inl or inr are inclusions but not both We will also drop usually the subscript of the functor SenAINS and the subscripts of j AINS if it can be inferred from the context We will also refer as j AINS jAlg j P SenAINS the obvious extension of the satisfaction relation to a set of sentences For any signatures jAlgSigj and for any signature morphism the morphism SenAINS SenAINS SenAINS will be normally denoted just by SenAINS SenAINS De nition An institution INS SignINS SenINS SignINS Set ModINS Sign op INS Cat j INS SignINS is semiexact if for any pushout in SignINS inl inr of any pair of morphisms and for any models M ModINS M ModINS such that M j M j there exists an unique model M ModINS such that M jinl M and M jinr M Notation This de nition is equivalent to the de nition of semiexact insti tution presented in Proposition Any xed but arbitrary algebraic institution AINS is semiex act Now we present a concrete higher order algebraic institution HOL Before presenting it we give some basic de nitions which will be used in its de nition De nition For each S Op Pr jAlgSigj the set TypesHOL is inductively de ned by the following set of rules If s S then s TypesHOL If TypesHOL n TypesHOL and n then n TypesHOL Notation The type will be normally denoted by Prop For any signature morphism we will also denote by the usual renaming function between types TypesHOL TypesHOL De nition The semantic function J KA is inductively de ned for any type TypesHOL and for any algebra A as follows JsKA As J n KA P J KA J nKA Notation The semantics of Prop is a set of two elements the empty set and the set with the empty tuple These two elements will be denoted as and tt respectively De nition The set SenHOL XHOL for a xed but arbitrary TypesHOL sorted in nite denumerable set of variablesXHOL and for every TypesHOL is inductively de ned by the following set of rules If x XHOL then x SenHOL XHOL If f s sn s Ops t T s XHOL s s S tn T sn XHOL s s S then f t tn SenHOL XHOL s If p s sn Prs t T s XHOL s s S tn T sn XHOL s s S then p t tn SenHOL XHOL Prop If n TypesHOL x XHOL xn XHOL n and SenHOL XHOL Prop then x xn n SenHOL XHOL n if n TypesHOL t SenHOL XHOL n t SenHOL XHOL tn SenHOL XHOL n then t t tn SenHOL XHOL Prop if TypesHOL x XHOL and SenHOL XHOL Prop then
منابع مشابه
Finitary non compositional proof systems for ASL in rst order and higher order logic
In this paper we present nitary proof systems for the deduction of sentences from algebraic speci cations inductively de ned by speci ca tion expresssions in rst order and higher order logic Mainly we redesign the proof systems presented in and in for the reachability and be havioural operators The main application of the result is to give an adequate representation of this kind of proof system...
متن کاملType Checking Parametrised Programs and Specifications in ASL+FPC
ASL+ [SST92] is a kernel specification language with higherorder parametrisation for programs and specifications, based on a dependently typed λ-calculus. ASL+ has an institution-independent semantics, which leaves the underlying programming language and specification logic unspecified. To complete the definition, and in particular, to study the type checking problem for ASL+, the language ASL+...
متن کاملBehavioural Semantics of Algebraic Specifications in Arbitrary Logical Systems
Behavioural semantics for specifications plays a crucial role in the formalization of the developments process, where a specification need not to be implemented exactly but only so that the required system behaviour is achieved. There are two main approaches to the definition of behavioural semantics: the internal one (called behavioural semantics) and external one (called abstractor semantics)...
متن کاملA Kernel Language for Algebraic Specification and Implementation - Extended Abstract
Abatrect A kernel specification language called ASL is presented. ASL comprises five fundamental but powerful specificationbuilding operations and has a simple semantics. Behavioural abstraction with respect to a set of observable sorts san be expressed, and (recurstve) parameterisad specifications can be defined using a more powerful and more expressive parameterisation mechanism than usual. A...
متن کاملSpeci cations with Observable
We consider algebraic speciications with observational features. Axioms as well as observations are formulae of full (Many-Sorted) First Order Logic with Equality. The associated semantics is based on a non standard interpretation of equality called observational equality. We study the adequacy of this semantics for software specii-cation and the relationship with behavioural equivalence of alg...
متن کامل